package com.cqwu.dao.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cqwu.bean.Sysuser;
import com.cqwu.dao.SysUserDao;

@Service("sysUserDao")
@Transactional
public class SysUserDaoImpl<T> extends BaseDaoImpl<T> implements SysUserDao<T>{

	public Sysuser get(Integer id) {
		return hibernateTemplate.get(Sysuser.class, id);
	}
	
	/**
	 * 分页查询
	 * pageNum:页码
	 * pageSize:页面大小
	 */
	
	public List<T> getPageData(String hql,int pageNum,int pageSize) {
		return findByPage(hql, pageNum, pageSize);
	}
	
	//总记录数
	public Long getTotalRecord(Class<T> entityClazz){
		return findCount(entityClazz);
	}
	
}
